<template>
  <div class="person">
    <el-table :data="list" :border="!butFlag" highlight-current-row @current-change="handleCurrentChange"
              v-loading="loading"
              :height="high">
      <template v-for="(item,index) in items">
        <template v-if="index < 4">
          <template v-if="item.meth">
            <el-table-column :formatter="item.meth" fixed key="index" :prop="item.prop" :label="item.label"
                             align="center" width="200"></el-table-column>
          </template>
          <template v-else>
            <el-table-column key="index" fixed :prop="item.prop" :label="item.label" align="center"
                             width="200"></el-table-column>
          </template>
        </template>
        <template v-else>
          <template v-if="item.meth">
            <el-table-column :formatter="item.meth" key="index" :prop="item.prop" :label="item.label"
                             align="center" width="160"></el-table-column>
          </template>
          <template v-else>
            <el-table-column key="index" :prop="item.prop" :label="item.label" align="center"
                             width="160"></el-table-column>
          </template>
        </template>
      </template>
    </el-table>
  </div>
</template>
<script>
  import moment from 'moment'
  export default {
    name: 'Tabs',
    props: {
      list: Array,
      loading: Boolean,
      butFlag: Boolean,
      items: Array,
      high: Number
    },
    methods: {
      handleCurrentChange (val) {
        this.currentRow = val
        this.$emit('refund', val)
      }
    }
  }
</script>
<style scoped>
  .nam {
    width: 758px;
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    margin: auto;
  }
</style>
